<div class="inside">
  <aside class="navigationPanel">
     
     <div class="tree pagesLinks">
        <ul>
           <ul>
			<li> <a href="<?php echo $baseurl.'campaign/sua-dia-diem?place_id='.$id.'.html'?>" class="active"><i class="fa fa-star"></i>Sửa địa điểm</a> </li>
              <li> <a href="<?php echo $baseurl.'campaign/dia-diem.html'?>" class=""><i class="fa fa-star"></i> Địa điểm</a> </li>
			  <li> <a href="<?php echo $baseurl.'campaign/tat-ca.html'?>"><i class="fa fa-star"></i> Tất cả chiến dịch</a> </li>
              <li> <a href="<?php echo $baseurl.'campaign/cho-duyet.html'?>"><i class="fa fa-star"></i> Chiến dịch chờ duyệt</a> </li>
              <li> <a href="<?php echo $baseurl.'campaign/dang-chay.html'?>"><i class="fa fa-star"></i> Chiến dịch đang chạy</a> </li>
			  <li> <a href="<?php echo $baseurl.'campaign/dang-tam-dung.html'?>"><i class="fa fa-star"></i> Chiến dịch đang tạm dừng</a></li>
			  <li> <a href="<?php echo $baseurl.'campaign/da-huy.html'?>"><i class="fa fa-star"></i> Chiến dịch đã hủy</a> </li>
           </ul>
        </ul>
     </div>
  </aside>
  <div class="contentPanel">
     <div class="pages" id="profile">
        <div class="profile-edit-form">
              <?php $att = array('id' => 'frm-profileEdit-editForm', 'class' => 'profileForm');echo form_open('', $att);?>
              <div class="contentBox switcher" style="height: 100%;">
                 <h3>Sửa địa điểm</h3>
                 <?php if(validation_errors()):?>
                    <h4>
                        <p><?php echo validation_errors(); ?></p>
                    </h4>
                    <?php endif;?>
                 <div class="contentSwitcher hide" style="display: block;">
                    <div class="insideContentBox">
                      
                       <label for="frm-fullname">Tên cửa hàng/nhà hàng (*):</label> 
                       <input type="text" name="shopName" value="<?php echo $getPlaceInfo->shopName;?>" class="ipt" autocomplete="off" id="frm-username" placeholder="Tên cửa hàng/nhà hàng">
					   
                       <label for="frm-fullname">Địa chỉ (*):</label> 
                       <input type="text" name="address" value="<?php echo $getPlaceInfo->address;?>" class="ipt" autocomplete="off" id="frm-address" placeholder="Địa chỉ">
                       
					   <label for="frm-fullname">Số điện thoại (*):</label> 
                       <input type="text" name="mobile" value="<?php echo $getPlaceInfo->mobile;?>" class="ipt" autocomplete="off" id="frm-mobile" placeholder="Số điện thoại">
                       
					   <label for="frm-fullname">Địa chỉ dải mạng (*):</label> 
                       <input type="text" name="ip" value="<?php echo $getPlaceInfo->ip;?>" class="ipt" autocomplete="off" id="frm-ip" placeholder="Địa chỉ dải mạng">
                       
					   <label for="frm-fullname">Kinh độ latitude (*):</label> 
                       <input type="text" name="lat" value="<?php echo $getPlaceInfo->lat;?>" class="ipt" autocomplete="off" id="frm-lat" placeholder="Kinh độ latitude">
					   <label for="frm-fullname">Vĩ độ longitude (*):</label> 
                       <input type="text" name="long" value="<?php echo $getPlaceInfo->long;?>" class="ipt" autocomplete="off" id="frm-long" placeholder="Vĩ độ longitude">
					   
                       <label for="frm-address">Chọn modem (*):</label> 
                       <div class="custom-line" style="width: 350px;">
                           <span>
                               <select style="width: 350px;" name="nas_id"><?php echo $getListModem;?></select>
                           </span>
                       </div>
                       <div class="lineButton">
                           <button type="submit" class="applyBtn btn btn-small btn-primary"><span>Lưu lại</span></button>
                           <button type="button" onclick="window.location='<?php echo $baseurl.'campaign/dia-diem.html'?>'" class="cancelBtn btn btn-default btn-small"><span>Hủy bỏ</span></button>
                       </div>
                    </div>
                 </div>
              </div>
           </form>
        </div>
     </div>
  </div>
</div> 
<script>

$(function()
{
    $("#level").on('change', function()
    {
        var id = $(this).val();
        if(id == 3)
        {
            $.ajax({
               type: 'get',
               beforeSend: function()
               {
                    $("#list-agency").show(); $("#list-place").hide();
               },
               url: '<?php echo site_url()?>get-agency-ajax',
               success: function(data)
               {
                    $("#content-list-agency").html(data);
               }
            });
        }else{
			if(id == 4)
			{
				$.ajax({
				   type: 'get',
				   beforeSend: function()
				   {
						$("#list-place").show(); $("#list-agency").hide();
				   },
				   url: '<?php echo site_url()?>get-place-ajax',
				   success: function(data)
				   {
						$("#content-list-place").html(data);
				   }
				});
			}else{
				$("#list-agency").hide(); $("#list-place").hide();
				$input = '<input name="agency" value="xx" type="hidden"/>'; $input_ = '<input name="place" value="xx" type="hidden"/>';
				$("#content-list-agency").html($input); $("#content-list-place").html($input_);
			}
        }
    })    
});

function convertimage(id, id_parse, img_show, check_image)
{
    var id = id;
    var id_parse = id_parse;
    var img_show = img_show;
    var check_image = check_image;
    var filesSelected = document.getElementById(id).files;
    if (filesSelected.length > 0)
    {
        var fileToLoad = filesSelected[0];

        var fileReader = new FileReader();

        fileReader.onload = function(fileLoadedEvent) 
        {
            $("#"+id_parse).attr('value', fileLoadedEvent.target.result);
            $("#"+check_image).val('1');
            //document.getElementById('cddd').html(fileLoadedEvent.target.result);
            $("#"+img_show).attr('src', fileLoadedEvent.target.result);
        };

        fileReader.readAsDataURL(fileToLoad);
    }
}
/*function convertimage()
{
    
        var filesSelected = document.getElementById("frm-img").files;
        if (filesSelected.length > 0)
        {
            var fileToLoad = filesSelected[0];
    
            var fileReader = new FileReader();
    
            fileReader.onload = function(fileLoadedEvent) 
            {
                var textAreaFileContents = document.getElementById
                (
                    "textAreaFileContents"
                    );
                $("#img_hd").attr('value', fileLoadedEvent.target.result);
            };
    
            fileReader.readAsDataURL(fileToLoad);
        }
    
    
    
}*/
</script>
<style>
body.flash-permanent .contentPanel {
    padding: 100px 0px 18px !important;
}
.cfr {
    line-height: 1px !important;padding: 15px 79px 0px 12px !important;height: 37px !important;
}
</style>